<script type="text/javascript">
            $(function() {
              $('#add_prod').tabs({ fxSlide: false, fxFade: false, fxSpeed: 'normal' });
            });
        </script>
            <?php 
					if(isset($product['MasterProduct']) and ($product['MasterProduct']))
						{
							foreach($product['MasterProduct'] as $key=>$value)
								{
									if(isset($product['MasterProduct'][''.$key.'']) and ($product['MasterProduct'][''.$key.'']))
										{
											$product['MasterProduct'][''.$key.''] = $product['MasterProduct'][''.$key.''];
										}
									else{
											$product['MasterProduct'][''.$key.''] = "";
										}
							}
						}
					if(isset($product['Product']) and ($product['Product']))
						{
							foreach($product['Product'] as $key=>$value)
								{
									//echo $key.'<br>';
									if(isset($product['Product'][''.$key.'']) and ($product['Product'][''.$key.'']))
										{
											$product['Product'][''.$key.''] = $product['Product'][''.$key.''];
										}
									else{
											$product['Product'][''.$key.''] = "";
										}
								}
						}
			?>
            
<div class="pad_10"></div>

<?php
if(isset($showable_products[0]) and ($showable_products[0])){
	$showable_products = $showable_products[0];
}else if(isset($paramshowable_products) and ($paramshowable_products)){
	$showable_products = $paramshowable_products; 
}
//pr($showable_products);
//exit;
?>
<div class="sell_ser_prod">
        	<h2><?php //echo $html->link($showable_products['Product']['name'], array('controller'=>'products', 'action'=>'product', $showable_products['Product']['slug']), array('escape'=>false));?>WonderE Marketplace Offer</h2>
            <div class="def_width_100 f_left">
            	<div class="width_15 f_left">
                 <?php
					 echo $html->link($html->image('Product/'.$showable_products['Product']['img'], 
						array(
						'width'=>'371',
						'height'=>'240')
						), 
						array(
						'controller'=>'products',
						'action'=>'product',
						$showable_products['Product']['slug']
						),
						array(
						'escape'=>false
						)
						);
				 ?>
                </div>
                <div class=" width_60 f_left">
                	<ul class="ul_prod_listing">
                    	<li><p><!--<a href="#" class="brown_link" >Spot Connect: GPS Messenger/Tracking System</a>-->
                        <?php echo $html->link($showable_products['Product']['name'], array('controller'=>'products', 'action'=>'product', $showable_products['Product']['slug']), array('escape'=>false, 'class'=>'brown_link'));?>
                        </p>
                         <p><b>ASIN:</b>   <?php echo $showable_products['Product']['wisn']; ?><br/>
							<b>Manufacturer:</b>  <?php echo $showable_products['Product']['manufacturer']; ?><br/>
							<b>Model Number:</b>  <?php echo $showable_products['Product']['p_model']; ?></p>
                            <b>MSRP:</b>  $<?php echo $showable_products['Product']['msrp']; ?></p>
                        </li>
                    
                    </ul>
                
                </div>
                <div class="width_20 f_right">
                	<div class="pad_10"></div>
                	<ul class="def_ul_pro text_def_11">
                    	<li><b>Competing Marketplace Offers</b></li>
                        <li><!--<a href="#" class="blue_link">29</a>-->
                        All from <span class="red">$<?php  if($showable_products['Product']['MasterProduct']['price']>0) {
							echo $showable_products['Product']['MasterProduct']['price']; } else{
								echo 0; }
								?></span></li>
                        <?php
							if(isset($showable_products['Product']['condition']) and ($showable_products['Product']['condition']))
							{
						?>
                        <li><!--<a href="#" class="blue_link">21</a>-->  <?php echo $showable_products['Product']['condition']['name']; ?> 
                        from <span class="red">$<?php 
						if($showable_products['Product']['MasterProduct']['price']>0)
						{
							 echo $showable_products['Product']['MasterProduct']['price']; 
						} else { echo 0; } ?></span></li>
                        <?php
							}
							?>
                        <li>&nbsp;</li>
                        <li><b>List Price </b></li>
                        <li><span class="red">$<?php if($showable_products['Product']['MasterProduct']['price']>0){ echo $showable_products['Product']['MasterProduct']['price']; } echo 0;  ?></span></li>
                        <!--<li>&nbsp;</li>
                        <li><b>Amazon Sales Rank</b></li>
                        <li><span class="red">89</span></li>-->
                   </ul>
                	<div class="pad_10"></div>
                </div>
            </div>
        
        </div>


<div class="def_width_100 f_left">
<?php echo $form->create(array('action'=>'','method'=>'post','enctype'=>'multipart/form-data', 'class' => 'mws-form')); ?>

    <input name="data[MasterProduct][product_wisn]" value="<?php echo $wisn_n; ?>" class="mws-textinput" id="ProductName" type="hidden">
  <div class="width_79 f_right def_width_100"> 
    <div class="def_width_100 f_left add_prod">
      <ul>
        <li><a href="#fragment-13"><span>Vital Info</span></a></li>
        <li class="tabs-selected"><a href="#fragment-14"><span>
			<?php echo $html->image('star_red.jpg'); ?>
         Offer</span></a></li>
        <li><a href="#fragment-15"><span>Images</span></a></li>
        <li><a href="#fragment-16"><span>Description</span></a></li>
        <li><a href="#fragment-17"><span>Keywords</span></a></li>
      <!--  <li><a href="#fragment-18"><span>More Details</span></a></li>-->
      </ul>
        <div id="fragment-13">
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Product Name: </div>
          <div class="acc_form_2">
            <?php echo $product['Product']['name']; ?>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Manufacturer : </div>
          <div class="acc_form_2">
           <?php echo $product['Product']['manufacturer']; ?>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Upc Number : </div>
          <div class="acc_form_2">
            <?php
			echo $product['Product']['upc']
?>
          </div>
        </div>
         <div class="def_width_100 f_left">
          <div class="acc_form_1">Weight : </div>
          <div class="acc_form_2">
            <?php
			echo $product['Product']['weight']
?>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Category : </div>
          <div class="acc_form_2">
          <select disabled="disabled" style="color: #000000;background: none repeat scroll 0 0 #FFFFFF; border: medium none;">
              <?php
			foreach ($_list_categories as $_list_category)
			  {
				if (isset($_list_category['subcatecategories']) and ($_list_category['subcatecategories']))
				  {
					if ($_list_category['name']):
						echo "<optgroup label=" . $_list_category['name'] . ">";
						foreach ($_list_category['subcatecategories'] as $_list_category_sub)
						  {
							  if(isset($_list_category_sub['Category']['id']) and ($_list_category_sub['Category']['id']==$product['Product']['cat_id']))
							  	{
									$selected = 'selected="selected"';
							  	}
								else
								{
									$selected = '';
								}
							echo "<option  ".$selected." value=" . $_list_category_sub['Category']['id'] . ">" . $_list_category_sub['Category']['name'] . "</option>";
						  }
						echo "</optgroup>";
					endif;
				  }
			  }
?>
            </select>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Styles : <span class="gray_comment">(Max. 50 characters)</span> </div>
          <div class="acc_form_2">
            <div class="mws-form-item small">
              <?php
				echo $this->Form->input('Product.dept_id', array(
					'type' => 'select',
					'options' => $_list_departments,
					'default' => $product['Product']['dept_id'],
					'class' => 'select_count1',
					'empty' => false,
					'required'=>true,  
					'disabled'=>'disabled',
					'style'=>'color: #000000;background: none repeat scroll 0 0 #FFFFFF; border: medium none;', 
					'label' => false
					
				));
				?>
             </div>
          </div>
          <div class="def_width_100 f_left">
            <div class="acc_form_1">Brand  :</div>
            <div class="acc_form_2">
              <?php
				echo $this->Form->input('Product.brand_id', array(
					'type' => 'select',
					'options' => $_list_brands,
					'default' => $product['Product']['brand_id'],
					'class' => 'select_count1',
					'empty' => false,
					'required'=>true,  
					'style'=>'color: #000000;background: none repeat scroll 0 0 #FFFFFF; border: medium none;', 
					'disabled'=>'disabled',
					'label' => false
				));
				
				?>
             </div>
          </div>
          
        </div>
      </div>
        <div id="fragment-14">
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Seller SKU <span class="redstar">*</span>: <span class="gray_comment">(Unique Identifier. If you don't enter a SKU we'll create one for you.) </span> </div>
          <div class="acc_form_2">
            <div class="input text">
              <input name="data[MasterProduct][sku]" value="<?php echo $product['MasterProduct']['sku']; ?>" required="required" class="mws-textinput" id="ProductName" type="text">
               <input name="data[MasterProduct][id]" value="<?php echo $product['MasterProduct']['id']; ?>" id="ProductName" type="hidden">
            </div>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Condition<span class="redstar">*</span> : </div>
          <div class="acc_form_2">
            <div class="input text">
              <?php
				echo $this->Form->input('MasterProduct.conditions', array(
					'type' => 'select',
					'options' => $list_pr_conditions,
					'default' => "".$product['MasterProduct']['conditions']."",
					'class' => 'select_count1',
					'empty' => false,
					'required'=>true, 
					'label' => false
				));
?>
            </div>
           </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Condition Note : </div>
          <div class="acc_form_2">
            <div class="input text">
              <textarea name="data[MasterProduct][condition_note]"  style="width: 255px; height: 114px;" value="<?php echo $product['MasterProduct']['condition_note']; ?>">
			  <?php echo $product['MasterProduct']['condition_note']; ?></textarea>
            </div>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Your price <span class="redstar">*</span>: </div>
          <div class="acc_form_2">
            <div class="input text">
              <input type="text" id="ProductName" required="required" class="mws-textinput" value="<?php echo $product['MasterProduct']['price']; ?>" name="data[MasterProduct][price]">
            </div>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Sale price: </div>
          <div class="acc_form_2">
            <div class="input text">
              <input type="text" id="ProductName" class="mws-textinput" value="<?php echo $product['MasterProduct']['sale_price']; ?>" name="data[MasterProduct][sale_price]">
            </div>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Sale start date: </div>
          <div class="acc_form_2">
            <div class="input text">
              <input type="text" id="ProductName" class="mws-textinput" value="<?php echo $product['MasterProduct']['available_from_date']; ?>" name="data[MasterProduct][available_from_date]">
            </div>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Sale end date: </div>
          <div class="acc_form_2">
            <div class="input text">
              <input type="text" id="ProductName" class="mws-textinput" value="<?php echo $product['MasterProduct']['available_to_date']; ?>" name="data[MasterProduct][available_to_date]">
            </div>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Quantity <span class="redstar">*</span>: </div>
          <div class="acc_form_2">
            <div class="input text">
              <input type="text" id="ProductName"  required="required" class="mws-textinput" value="<?php echo $product['MasterProduct']['qty']; ?>" name="data[MasterProduct][qty]">
            </div>
          </div>
        </div>
        <!--<div class="def_width_100 f_left">
        <div class="acc_form_1">MIn Quantity To Sell:  </div>
        <div class="acc_form_2">
         <div class="input text"><input type="text" id="ProductName" class="mws-textinput" value="" name="data[MasterProduct][min_qty]"></div>           </div>  
         </div>-->
        
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Handling time (in days) <span class="redstar">*</span>:</div>
          <div class="acc_form_2">
            <div class="input text">
              <input type="text" id="ProductName"  required="required" class="mws-textinput" value="<?php echo $product['MasterProduct']['handle_time']; ?>" name="data[MasterProduct][handle_time]">
            </div>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Seller Warranty Description:</div>
          <div class="acc_form_2">
            <div class="input text">
              <input type="text" id="ProductName" class="mws-textinput" value="<?php echo $product['MasterProduct']['warranty']; ?>" name="data[MasterProduct][warranty]">
            </div>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1">Shipping Method: </div>
          <div class="acc_form_2">
            <div class="input text">
           <?php
			$checked ="";
			$checked_1 ="";
			$checked_3 = "";
			$checked_4="";
		    if(isset($product['MasterProduct']['shipping_method']) and ($product['MasterProduct']['shipping_method']=='WSF'))
				{
					$checked = 'checked="checked"';
				}
			else if(isset($product['MasterProduct']['shipping_method']) and ($product['MasterProduct']['shipping_method']=='MSF'))
				{
					$checked_1 = 'checked="checked"';
				}
			else if(isset($product['MasterProduct']['shipping_method']) and ($product['MasterProduct']['shipping_method']=='Free'))
				{
					$checked_4 = 'checked="checked"';
				}
			else
				{
					$checked_3 = 'checked="checked"';
				}
			?>
              <input name="data[MasterProduct][shipping_method]" <?php echo $checked; echo $checked_3;?> value="MSF"  type="radio">
             Shipping Price Added for product&nbsp;<br>
              <input name="data[MasterProduct][shipping_method]" <?php echo $checked_4; ?> value="Free" type="radio">
              Free Shipping Your Product.&nbsp;<br>
            </div>
          </div>
        </div>
      </div>
        <div id="fragment-15">
        <h3>Main Product Images:</h3><br />
<br />
        <?php
		
		$rel_images = $product['Product']['rel_img'];
		$rel_images_exp = explode(', ',$rel_images);
		if(isset($rel_images_exp[0]) and ($rel_images_exp[0]))
				{
					$height="";
					
				}
				else
				{
					$height="";
				}

		if(isset($product['Product']['img']) and ($product['Product']['img']))
			{
				echo $html->image('Product/'.$product['Product']['img'],array('height'=>$height, 'width'=>'371', 'class'=>'variable_image item-3 drop-shadow"', 'alt'=>""));  
			}
    ?>
       <h3>Related Images:</h3><br />
<br />

 
         <?php
			if(isset($rel_images_exp[0]) and ($rel_images_exp[0]))
				{
					echo '<div class="thumbs">';
					foreach($rel_images_exp as $rel_imag)
						{
							echo $html->image('Product/'.$product['Product']['id'].'/'.$rel_imag, array('width'=>'90', 'height'=>'83'));
						}
					echo '</div>';	
				}

?>
        </div>
        <div id="fragment-16">
        <div class="def_width_100 f_left">
          <div class="acc_form_1 form_width_27">Description </div>
          <div class="acc_form_2 form_width_70">
            <div class="input text">
              <?php
				echo $product['Product']['description'];
				?>
            </div>
          </div>
        </div>
      </div>
        <div id="fragment-17">
        <div class="def_width_100 f_left">
          <div class="acc_form_1 form_width_27"> Meta Keywords </div>
          <div class="acc_form_2 form_width_70">
            <div class="input text">
              <?php
				echo $product['Product']['meta_key']
				?>
             
            </div>
          </div>
        </div>
        <div class="def_width_100 f_left">
          <div class="acc_form_1 form_width_27">Meta Description </div>
          <div class="acc_form_2 form_width_70">
            <div class="input text">
			<?php
            echo $product['Product']['meta_desc']
            ?>
            </div>
          </div>
        </div>
      </div>
        <!--<div id="fragment-18">
       
        </div>-->
    </div>
  </div>
  <div class="def_width_100 f_left ">
    <div class="pad_10"></div>
    <div class="width_60 f_right">
      <input name="" type="submit" value="submit" class="form_btn"/>
    </div>
  </div>
  </form>
</div>

